<?php namespace Admin\Controller;
class UploadController extends AuthController{

	//Kindedtiro上传处理
	public function upload()
	{
		if($file = Upload::make())
		{
			$json = array('error' => 0, 'url' => '/'.$file[0]['path']);
		}
		else
		{
			$json = array('error' => 1, 'url' => Upload::getError());
		}

		//echo json_encode($json);
		//exit;
		View::ajax($json);
	}
}